home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / _GUICtrlStatusBarSetTip.au3 < prev    next >
Text File  |  2006-08-01  |  989b  |  31 lines

  1. opt("MustDeclareVars", 1)
  2.  
  3. #include <GUIConstants.au3>
  4. #Include <GuiStatusBar.au3>
  5.  
  6. Local $gui, $StatusBar1, $msg
  7. Local $a_PartsRightEdge[3] = [100, 200, -1]
  8. Local $a_PartsText[3] = ["", "Force tip to be shown when text is more than fits in the box", "Even More Text"]
  9.  
  10. $gui = GUICreate("Status Bar Set Tip", 500, -1, -1, -1, $WS_SIZEBOX)
  11.  
  12. $StatusBar1 = _GUICtrlStatusBarCreate ($gui, $a_PartsRightEdge, $a_PartsText, $SBT_TOOLTIPS)
  13. _GUICtrlStatusBarSetIcon($StatusBar1, 0, "shell32.dll", 21)
  14. _GUICtrlStatusBarSetTip($StatusBar1, 0, "Tip works when only icon in part or text exceeds part")
  15. _GUICtrlStatusBarSetTip($StatusBar1, 1, "Force tip to be shown when text is more than fits in the box")
  16. _GUICtrlStatusBarSetTip($StatusBar1, 2, "Part 3")
  17.  
  18. GUISetState(@SW_SHOW)
  19.  
  20. While 1
  21.     $msg = GUIGetMsg()
  22.     Select
  23.         Case $msg = $GUI_EVENT_RESIZED
  24.             _GUICtrlStatusBarResize ($StatusBar1)
  25.         Case $msg = $GUI_EVENT_CLOSE
  26.             ExitLoop
  27.         Case Else
  28.             ;;;;;
  29.     EndSelect
  30.     
  31. WEnd